﻿<%@ Page Language="C#" %>

<!DOCTYPE html>

<script runat="server">
  protected void Page_Load(object sender, EventArgs e)
  {
    //從國泰世華取得傳遞資料，資料交換採用Server to Server(backgroup)傳送，無畫面
    CompanyID.Value = CommonUtil.GetRequestValue("CompanyID");
    orderNoGenDate.Value = CommonUtil.GetRequestValue("orderNoGenDate");
    PtrAcno.Value = CommonUtil.GetRequestValue("PtrAcno");
    MerchantKey.Value = CommonUtil.GetRequestValue("MerchantKey");
    string amt = CommonUtil.GetRequestValue("amt");    
    try
    {
      //檢核資料庫中是否有該筆訂單      
      B2C_MALL_ORDER ws = new B2C_MALL_ORDER();
      ws.Url = ConfigurationManager.AppSettings["B2C_MALL_ORDER"].ToString();
      rtnCode.Value = 
        ws.B2C_MALL_payment_choose_WebATM_Check(CommonUtil.GetWebDevice()
        , HttpContext.Current.User.Identity.Name
        , PtrAcno.Value
        , amt);
    }
    catch (Exception)
    {
      rtnCode.Value = "1111";
    }    
  }

</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>長榮樂e購</title>
</head>
<body>
  <form id="form1" runat="server">
    <div>
      <asp:HiddenField ID="CompanyID" runat="server" />
      <asp:HiddenField ID="orderNoGenDate" runat="server" />
      <asp:HiddenField ID="PtrAcno" runat="server" />
      <asp:HiddenField ID="MerchantKey" runat="server" />
      <asp:HiddenField ID="rtnCode" runat="server" Value="0000" />
    </div>
  </form>
</body>
</html>
